package com.tmy.sst.controller;

import com.tmy.sst.domain.Msg;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by taomengyi
 */
@Controller
@RequestMapping("protected")
public class ProtectedController {


    @RequestMapping("/index1")
    @ResponseBody
    public Object index(){
        Map<String,Object> result = new HashMap<>();
        Msg msg =  new Msg("测试标题","测试内容 index1","有该路径权限的用户可以访问");
        result.put("msg", msg);
        return result;
    }

    @RequestMapping("/index2")
    @ResponseBody
    public Object index2(){
        Map<String,Object> result = new HashMap<>();
        Msg msg =  new Msg("测试标题","测试内容 index2","有该路径权限的用户可以访问");
        result.put("msg", msg);
        return result;
    }

}
